<?php
    // list all pages available by the language
    if (!defined('EXPONENT')) exit('');

    if (exponent_permissions_check("administrate",$loc))
    {
        $lang=htmlentities(trim($_REQUEST['language']));
        $data = $db->selectObjects("section","language = '{$lang}' ORDER BY name");
        $html="";
        foreach ($data as $v)
        {
            $html.="<option value={$v->id}>{$v->name}</option>";
        }
        echo $html;
    }
?>
